/*
 *
递参数是字符数组，此时不需要有size变量，因为有'\0'的结束符
void fun(char *s);
void fun(char s[]);

 abbsdddsff

 */
#include<stdio.h>

char * del_space(char *s);

int main(){
	char s[100] = "abbsd   d dsf f  ";

	printf("%s\n",del_space(s));

	return 0;
}

char * del_space(char *s){
	char *p = s;
	char *q = s;
	while(*q != '\0'){
		if(*q == ' '){
			q++;
		}else {
			*p = *q;
			p++;
			q++;
		}
	}
	*p = '\0';
	return s;
}
